﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace V5_EaspLibs.Core {
    /// <summary>
    /// http服务器对象类
    /// </summary>
    public class HttpServerHelper {
        private static readonly HttpServerHelper m_Instance = new HttpServerHelper();
        /// <summary>
        /// 
        /// </summary>
        public static HttpServerHelper Instance {
            get { return m_Instance; }
        }
        #region 测试服务器支持的对象
        /// <summary>
        /// 测试服务器支持的对象
        /// </summary>
        /// <param name="str">对象的名称</param>
        /// <returns>bool</returns>
        public bool CheckObject(string ObjectName) {
            try {
                object obj = HttpContext.Current.Server.CreateObject(ObjectName);
                return (true);
            }
            catch {
                return (false);
            }
        }
        #endregion
    }
}
